<template>
  <view>
    <dk-diy-page :diy-data="diyData">
      <template #default="{ item }">
        <dk-diy-components :item="item" />
      </template>
    </dk-diy-page>
    <dk-tabbar page-path="pages/tabbar/home/index" />
  </view>
</template>

<script>
import { getConfig } from '~/api/config'

export default {
  data() {
    return {
      diyData: null,
      loading: true,
    }
  },
  onLoad() {
    this.init()
  },
  methods: {
    init() {
      getConfig('home_page').then((res) => {
        this.diyData = res.data
        this.loading = false
      })
    },
  },
}
</script>

<style lang="scss">
</style>
